<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the refreshAllOverlayEntries function from the overlay_entry library, for the Dart programming language.">
  <title>refreshAllOverlayEntries function - overlay_entry library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  
  <link rel="stylesheet" href="../static-assets/github.css?v1">
  <link rel="stylesheet" href="../static-assets/styles.css?v1">
  <link rel="icon" href="../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../"
      data-using-base-href="false">

<div id="overlay-under-drawer"></div>

<header id="title">
  <button id="sidenav-left-toggle" type="button">&nbsp;</button>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../index.html">flutter_boost</a></li>
    <li><a href="../overlay_entry/overlay_entry-library.html">overlay_entry</a></li>
    <li class="self-crumb">refreshAllOverlayEntries function</li>
  </ol>
  <div class="self-name">refreshAllOverlayEntries</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<main>


  <div id="dartdoc-main-content" class="main-content">
      <div>
<h1><span class="kind-function">refreshAllOverlayEntries</span> function 
 
</h1></div>

    <section class="multi-line-signature">
        

<span class="returntype">void</span>
<span class="name ">refreshAllOverlayEntries</span>(<wbr><ol class="parameter-list"><li><span class="parameter" id="refreshAllOverlayEntries-param-containers"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/List-class.html">List</a><span class="signature">&lt;<wbr><span class="type-parameter"><a href="../boost_container/BoostContainer-class.html">BoostContainer</a></span>&gt;</span></span> <span class="parameter-name">containers</span></span></li>
</ol>)

    </section>
    
<section class="desc markdown">
  <p>Refresh all of overlayEntries</p>
</section>


    
<section class="summary source-code" id="source">
  <h2><span>Implementation</span></h2>
  <pre class="language-dart"><code class="language-dart">void refreshAllOverlayEntries(List&lt;BoostContainer&gt; containers) {
  final overlayState = overlayKey.currentState;
  if (overlayState == null) {
    return;
  }

  if (_lastEntries != null &amp;&amp; _lastEntries.isNotEmpty) {
    for (var entry in _lastEntries) {
      entry.remove();
    }
  }

  _lastEntries = containers
      .map&lt;_ContainerOverlayEntry&gt;(
          (container) =&gt; _ContainerOverlayEntry(container))
      .toList(growable: true);

  overlayState.insertAll(_lastEntries);

  &#47;&#47; https:&#47;&#47;github.com&#47;alibaba&#47;flutter_boost&#47;issues&#47;1056
  &#47;&#47; Ensure this frame is refreshed after schedule frame，
  &#47;&#47; otherwise the PageState.dispose may not be called
  final hasScheduledFrame = SchedulerBinding.instance.hasScheduledFrame;
  final framesEnabled = SchedulerBinding.instance.framesEnabled;
  if (hasScheduledFrame || !framesEnabled) {
    SchedulerBinding.instance.scheduleWarmUpFrame();
  }
}</code></pre>
</section>


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
  <li><a href="../index.html">flutter_boost</a></li>
  <li><a href="../overlay_entry/overlay_entry-library.html">overlay_entry</a></li>
  <li class="self-crumb">refreshAllOverlayEntries function</li>
</ol>


    <h5>overlay_entry library</h5>
    <ol>




  <li class="section-title"><a href="../overlay_entry/overlay_entry-library.html#properties">Properties</a></li>
  <li><a href="../overlay_entry/overlayKey.html">overlayKey</a></li>

  <li class="section-title"><a href="../overlay_entry/overlay_entry-library.html#functions">Functions</a></li>
  <li><a href="../overlay_entry/refreshAllOverlayEntries.html">refreshAllOverlayEntries</a></li>
  <li><a href="../overlay_entry/refreshSpecificOverlayEntries.html">refreshSpecificOverlayEntries</a></li>

  <li class="section-title"><a href="../overlay_entry/overlay_entry-library.html#enums">Enums</a></li>
  <li><a href="../overlay_entry/BoostSpecificEntryRefreshMode-class.html">BoostSpecificEntryRefreshMode</a></li>


</ol>

  </div><!--/.sidebar-offcanvas-left-->

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    flutter_boost
      3.0.0
  </span>

  
</footer>



<script src="../static-assets/highlight.pack.js?v1"></script>
<script src="../static-assets/script.js?v1"></script>



</body>

</html>

